package com.cyanite.playlv2api.parsers.json;

import com.cyanite.playlv2api.types.Photo;

import org.json.JSONException;
import org.json.JSONObject;

public class PhotoParser extends AbstractParser<Photo> {

    @Override
    public Photo parse(JSONObject json) throws JSONException {

        Photo obj = new Photo();
        if (json.has("photo")) {
            obj.setPhotoUrl(json.getString("photo"));
        }
        return obj;
    }
}